package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TicketsMapper;
import com.ruoyi.system.domain.Tickets;
import com.ruoyi.system.service.ITicketsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 票务信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-30
 */
@Service
public class TicketsServiceImpl implements ITicketsService 
{
    @Autowired
    private TicketsMapper ticketsMapper;

    /**
     * 查询票务信息
     * 
     * @param id 票务信息主键
     * @return 票务信息
     */
    @Override
    public Tickets selectTicketsById(Long id)
    {
        return ticketsMapper.selectTicketsById(id);
    }

    /**
     * 查询票务信息列表
     * 
     * @param tickets 票务信息
     * @return 票务信息
     */
    @Override
    public List<Tickets> selectTicketsList(Tickets tickets)
    {
        return ticketsMapper.selectTicketsList(tickets);
    }

    /**
     * 新增票务信息
     * 
     * @param tickets 票务信息
     * @return 结果
     */
    @Override
    public int insertTickets(Tickets tickets)
    {
        return ticketsMapper.insertTickets(tickets);
    }

    /**
     * 修改票务信息
     * 
     * @param tickets 票务信息
     * @return 结果
     */
    @Override
    public int updateTickets(Tickets tickets)
    {
        return ticketsMapper.updateTickets(tickets);
    }

    /**
     * 批量删除票务信息
     * 
     * @param ids 需要删除的票务信息主键
     * @return 结果
     */
    @Override
    public int deleteTicketsByIds(String ids)
    {
        return ticketsMapper.deleteTicketsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除票务信息信息
     * 
     * @param id 票务信息主键
     * @return 结果
     */
    @Override
    public int deleteTicketsById(Long id)
    {
        return ticketsMapper.deleteTicketsById(id);
    }

    @Override
    public List<Map<String, Object>> selectTicketsList2(Tickets tickets) {
        return ticketsMapper.selectTicketsList2(tickets);
    }
}
